#pragma once

#include <vex/iterable/concept/forward_range_concept.h>

namespace vex { namespace iterable { namespace concept {

    template <class T>
    class BiDirectionalRange : public ForwardRange<T> {
    public:
        typedef range_traits<T> traits;
        typedef typename traits::category category;
        typedef typename traits::range_type range_type;
        typedef typename traits::value_type value_type;
        typedef typename traits::reference reference;
        typedef typename traits::pointer pointer;
    public:
        BOOST_CONCEPT_ASSERT((boost::Convertible<category, bidirectional_range_tag>));
        BOOST_CONCEPT_USAGE(BiDirectionalRange)
        {
            m_result_of_move_back = m_instance.move_back();
            this->same_type(
                std::declval<reference>(), m_instance.back());
        }
    private:
        T m_instance;
        bool m_result_of_move_back;
    };
}}}